import http from '@/utils/http'

/*
  eg./ims-tworkgz-service/viewCstHistory/getCstHistory
*/

/** 获取 getRouteSamplingList 信息 */
export function getRouteSamplingList({ shopId, lotId }: { shopId: string, lotId: string }): Promise<any> {
    const data = {
        dtoName: 'ForceSamplingFlowDTO',
        queryId: 'GetForceSamplingFlowList',
        version: '80001',
        shopId,
        lotId
    }
    return http.request({
        url: '/ims-tworkgz-service/releaseHoldByGlass/getRouteSamplingList',
        method: 'post',
        data
    })
}

/** 获取 getRouteReworkList 信息 */
export function getRouteReworkList({ shopId, operation, route }: { shopId: string, operation: string, route: string }): Promise<any> {
    const data = {
        dtoName: 'ProcessFlowDTO',
        queryId: 'GetProcessFlowList',
        version: '80004',
        shopId,
        operation,
        route,
        processFlowType: 'Rework'
    }
    return http.request({
        url: '/ims-tworkgz-service/releaseHoldByGlass/getRouteReworkList',
        method: 'post',
        data
    })
}
